<?php

require_once './config.php';

$ids = $_REQUEST['ids'];

$ids = json_decode($ids);

for ($i = 0; $i < count($ids); $i++) {
    $id = $ids[$i];
    $sql = "DELETE from cartinfo WHERE id = $id";
    mysqli_query($conn, $sql);
}
echo json_encode(array(
    'code' => 1
   
));
